$(document).ready(function(){
    $("#banner_form").validate({
        rules: {
	    firstname: "required",
	    lastname: "required",
	    email: {
		required: true,
		email: true
	    },
	    tel: "required",
	    detail: "required"
	},
	messages: {
	    firstname: "&nbsp;&nbsp;&nbsp;&nbsp;<em>Please enter your firstname</em>",
	    lastname: "&nbsp;&nbsp;&nbsp;&nbsp;<em>Please enter your lastname</em>",
	    email: {
		required: "&nbsp;&nbsp;&nbsp;&nbsp;<em>Please enter your email address</em>",
		email: "&nbsp;&nbsp;&nbsp;&nbsp;<em>Please enter a valid email address</em>"
	    },
	    tel: "&nbsp;&nbsp;&nbsp;&nbsp;<em>Please enter your telephone number</em>",
	    detail: "&nbsp;&nbsp;&nbsp;&nbsp;<em>Please enter detail</em>"
	}
    });
    
    $('#mysubmit').click(function(){
	if($("#banner_form").valid()){
           $("#banner_form").submit();
        }
    });
});